<!-- 项目反馈记录 -->
<template>
	<view class="pageMain u-skeleton">
		<view class="topBox px-3" :style="{ paddingTop: statusBarHeight }">
			<view class="nav d-flex px-4 a-center font-lg text-light" :style="{ height: navBarHeight }"></view>
			<view class="logoBox text-main font-md iconfont icon-back" @click="backFn"></view>
			<view class="logoBox ">
				<view class="d-flex a-center j-sb">
					<view class="font text-h">发布时间：{{ formData.createDateTime }}</view>
					<view class="bg-blue rounded  px-2 py-1 font text-blue">{{ formData.acceptStatusName }}</view>
				</view>
				<view class="font-lg text-main font-weight pb-1">{{ formData.projectName }}</view>
				<view class="u-flex u-row-between pb-1">
					<view class="bg-grey  px-1 py text-primary font">{{ formData.rootInformationEnumName }}</view>
					<view class="text-primary font">
						<image
							class="imagesBox"
							mode="aspectFit"
							style="width: 46rpx ; height: 16rpx;"
							:src="getStaticFilePath('ico-jd.png')"
						></image>
						{{ formData.projectStageName }}
					</view>
				</view>

				<view class="projectBox  rounded-8  line-h-md">
					<view class="d-flex mt-2 a-center">
						<view class="iconfont icon-calendar-todo-fill text-primary"></view>
						<view class="font pl-1 text-677FA0">{{ formData.projectAddressName }}</view>
					</view>
				</view>
			</view>
		</view>

		<view class="d-flex j-sb pt-3 px-3 a-center ">
			<view class=" font-md text-main font-weight">经营信息</view>
			<view class="px-2 py-1 bg-write rounded-8 font text-primary" @click="hanglgAuditHistoryFn">
				变更历史记录
			</view>
		</view>
		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">基本信息</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">信息类型：</text>
						<text class="text-main font ">{{ formData.infoTypeName }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">预计产值规模：</text>
						<text class="text-main font ">{{ formData.outputScale }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">省份：</text>
						<text class="text-main font ">{{ formData.province }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">城市：</text>
						<text class="text-main font ">{{ formData.city }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">信息来源：</text>
						<text class="text-main font ">{{ formData.infoSource }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">项目备注：</text>
						<text class="text-main font ">{{ formData.projectRemark }}</text>
					</view>
				</view>
			</view>
		</view>

		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">联系人</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">联系人：</text>
						<text class="text-main font ">{{ formData.contactPerson }}</text>
					</view>
					<view class="flex-1">
						<text class="text-tips font">联系电话：</text>
						<text class="text-main font ">{{ formData.contactInfomation }}</text>
					</view>
				</view>
			</view>
		</view>

		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md" v-if="formData.projectStage == 'BidTender'">
			<view class="font-md text-main ">招标信息</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">资质要求：</text>
						<text class="text-main font ">{{ formData.qualifications }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">招标获取截止时间：</text>
						<text class="text-main font ">{{ formData.tenderClosingDate }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">招标截止时间：</text>
						<text class="text-main font ">{{ formData.deadlineForBidding }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">资金来源：</text>
						<text class="text-main font ">{{ formData.fundingSource }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">工程规模：</text>
						<text class="text-main font ">{{ formData.projectScale }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">工期要求：</text>
						<text class="text-main font ">{{ formData.durationRequired }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">招标范围：</text>
						<text class="text-main font ">{{ formData.tenderScope }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">招标控制价：</text>
						<text class="text-main font ">{{ formData.tenderControlPrice }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">保证金金额：</text>
						<text class="text-main font ">{{ formData.bond }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">缴纳保证金截止时间：</text>
						<text class="text-main font ">{{ formData.bondEndTime }}</text>
					</view>
				</view>
			</view>
		</view>

		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="font-md text-main ">项目方</view>
			<view class="line-h-md">
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">业主方公司名称：</text>
						<text class="text-main font ">{{ formData.ownerCompanyName }}</text>
					</view>
				</view>
				<view class="d-flex a-center">
					<view class="flex-1">
						<text class="text-tips font">施工方公司名称：</text>
						<text class="text-main font ">{{ formData.constructionName }}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="px-3 font-md text-main font-weight ">反馈情况</view>
		<view class="projectBox p-3 m-3 rounded-8 bg-write line-h-md">
			<view class="ml-2 p-1  rounded-8 line-h-md">
				<u-time-line>
					<u-time-line-item class="bg-write  rounded-8" v-for="(l, n) in feedbackPhaseList" :key="n">
						<template v-slot:content>
							<view>
								<view class="d-flex a-center j-sb">
									<view class="text-h font">{{ l.feedbackDate }}</view>
									<view
										class=" rounded u-m-r-14 px-2 py-1 font "
										:class="
											l.feedbackPhaseName == '跟进中'
												? 'bg-blue text-blue'
												: 'bg-success-1 text-primary'
										"
									>
										{{ l.feedbackPhaseName }}
									</view>
								</view>
								<view class="d-flex a-center">
									<view class="text-tips font">经营人员：</view>
									<view class="text-main font ">{{ l.busiPersonName }}</view>
								</view>
								<view class="d-flex a-start">
									<view class="text-tips font lable60">接洽内容：</view>
									<view class="text-main font  flex-1">{{ l.content }}</view>
								</view>
							</view>

							<view
								class="projectBox p-3 mt-1 rounded-8  bg-grey-3 line-h-md"
								v-for="(ll, ii) in l.deriveBusiInfoList"
								:key="ii"
							>
								<view class="d-flex j-sb a-center">
									<view class="text-h font">发布时间：{{ ll.publishTime }}</view>
								</view>
								<view class="font-lg text-main ">{{ ll.projectName }}</view>
								<view class="u-flex u-row-between">
									<view class="bg-grey  px-1 py text-h font">派生信息</view>
									<view class="d-flex a-center">
										<image
											class="imagesBox"
											mode="aspectFit"
											style="width: 46rpx ; height: 16rpx;"
											:src="getStaticFilePath('ico-jd.png')"
										></image>
										<view class="text-h font pl-1">{{ ll.projectStageName }}</view>
									</view>
								</view>
								<view class="p-2 my-2 bg-write  rounded line-h-md">
									<view class="d-flex a-center">
										<view class="flex-1">
											<text class="text-tips font">产业标记：</text>
											<text class="text-main font ">{{ ll.industryAssign }}</text>
										</view>
									</view>
									<view class="d-flex a-center">
										<view class="flex-1">
											<text class="text-tips font">省份：</text>
											<text class="text-main font ">{{ ll.province }}</text>
										</view>
										<view class="flex-1">
											<text class="text-tips font">城市：</text>
											<text class="text-main font ">{{ ll.city }}</text>
										</view>
									</view>
								</view>
								<view class="d-flex j-sb mt-2 a-center">
									<view class="font pl-1 text-677FA0">{{ ll.projectAddressName }}</view>
									<view class="listBnt">
										<button class="primaryMiniBnt " @click="projectDetailsFn(ll)">详 情</button>
									</view>
								</view>
							</view>
						</template>
					</u-time-line-item>
				</u-time-line>
			</view>
		</view>
	</view>
</template>

<script>
import { getbusiInfoData, getFeedbackSituation } from '@/api/apis.js';
export default {
	data() {
		return {
			statusBarHeight: '',
			navBarHeight: '',
			formData: {},
			feedbackPhaseList: []
		};
	},
	onLoad() {
		if (this.$Route.query.busiInfoId) {
			this.getbusiInfoDataFn(this.$Route.query.busiInfoId);
			this.getFeedbackSituationFn(this.$Route.query.busiInfoId);
		}
		/*#ifdef MP*/
		let that = this;
		uni.getSystemInfo({
			success: function(info) {
				// 屏幕高度
				let screenHeight = info.screenHeight;
				// 屏幕宽度
				let screenWidth = info.screenWidth;
				// 胶囊高度
				//状态栏高度
				that.statusBarHeight = info.statusBarHeight * 2 + 'rpx';
				let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
				let navBarHeight = menuButtonInfo.bottom + menuButtonInfo.top - screenHeight;
				that.navBarHeight = navBarHeight + screenHeight - info.statusBarHeight + 'rpx';
			}
		});
		/*#endif*/
	},
	methods: {
		//获取项目详情
		getbusiInfoDataFn(id) {
			getbusiInfoData({
				busiInfoId: id
			}).then(res => {
				if (res.code == 10000) {
					this.formData = res.data;
				} else {
					this.$u.toast(res.msg);
				}
			});
		},

		//获取项目反馈情况
		getFeedbackSituationFn(id) {
			getFeedbackSituation({
				busiInfoId: id
			}).then(res => {
				if (res.code == 10000) {
					this.feedbackPhaseList = res.data;
				} else {
					this.$u.toast(res.msg);
				}
			});
		},

		backFn() {
			this.$Router.back();
		},
		//变更历史记录
		hanglgAuditHistoryFn() {
			this.$Router.push({
				path: '/detailPages/pages/projectDetailsChangeHistory/index',
				query: {
					busiInfoId: this.$Route.query.busiInfoId
				}
			});
		},
		// 项目详情
		projectDetailsFn(item) {
			this.$Router.push({
				path: '/detailPages/pages/projectDetails/index',
				query: {
					busiInfoId: item.busiInfoId
				}
			});
		}
	}
};
</script>

<style lang="scss" scoped>
.pageMain {
	width: 100%;
	height: 100%;
	.topBox {
		background: linear-gradient(180deg, rgba(45, 143, 255, 0.4), rgba(190, 214, 250, 0) 100%);
		background-repeat: no-repeat;
		background-size: 100% 100%;
		.logoBox {
			padding-top: 40rpx;
		}
	}
	.lable60 {
		width: 120rpx;
	}
}
</style>
